import React from "react";
import {Button, Space} from 'antd';
import {Link} from 'react-router-dom';
import {
    PlusCircleOutlined,
    InboxOutlined
} from '@ant-design/icons';
import {ConferenceBox} from '../style';

interface IProps {
    deleteStatus: boolean,
    deleteBatch(): void
}

function ProConference(props: IProps) {

    const {deleteStatus, deleteBatch} = props;

    return(
        <ConferenceBox>
            <Space>
                <Link to='/conference/add'>
                    <Button
                        size='large'
                        type="primary"
                        className='commonBtn'
                        icon={<PlusCircleOutlined/>}
                    >
                        Add
                    </Button>
                </Link>
                <Button
                    size='large'
                    type="primary"
                    className='commonBtn'
                    disabled={!deleteStatus}
                    icon={<InboxOutlined/>}
                    onClick={deleteBatch}
                >
                    Delete
                </Button>
            </Space>

        </ConferenceBox>
    )
}
export default React.memo(ProConference)